package com.oracle.client;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.oracle.model.Student;
import com.oracle.service.StudentService;

public class Test {
	public static void main(String[] args) throws Exception {
		Student student = new Student();
		student.setId(1);
		student.setName("xxx");
		ClassPathXmlApplicationContext cxt = new ClassPathXmlApplicationContext("applicationContext.xml");
		StudentService service = (StudentService) cxt.getBean("studentService");
		StudentService service1 = (StudentService) cxt.getBean("studentService");
		System.out.println(service1==service);
		service.addStudent(student);
		cxt.destroy();
		
	}
}
